serialization: add test, make volumes null#151
Closed
philips wants to merge 2 commits intoopencontainers:masterfrom
Closed
serialization: add test, make volumes null#151philips wants to merge 2 commits intoopencontainers:masterfrom
philips wants to merge 2 commits intoopencontainers:masterfrom
Conversation
added 2 commits
June 15, 2016 22:48
This adds a test of the schema compatibility by taking the manifest of library/docker from the docker hub, with sha256 digest verification, and simply finding/replacing the four constant strings documented in media-types.md and ensuring that it passes OCI validation. https://github.com/opencontainers/image-spec/blob/master/media-types.md This test is functionaly equivalent to downloading a Docker v2.2 manifest into the file `docker-manifest: ``` $ curl -L -H "Authorization: Bearer ..." \ -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \ https://registry-1.docker.io/v2/library/docker/manifests/sha256fg:888206c77cd2811ec47e752ba291e5b7734e3ef137dfd222daadaca39a9f17bc > docker-manifest ``` And then running a regex to change `docker.distribution` to `oci.image` and changing `v2` to `v1` ``` $ cat docker-manifest | sed -e "s%docker\.distribution%oci\.image%g" -e "s%v2%v1%g" > oci-manifest ``` And finally testing the manifest with oci-image-tool: ``` $ oci-image-tool validate oci-manifest oci-manifest: OK ``` Signed-off-by: Brandon Philips <brandon.philips@coreos.com>
This is a spec change based on testing live Docker Hub configs. Volume may be null as found in the hub.docker.com/library/docker image. Signed-off-by: Brandon Philips <brandon.philips@coreos.com>
Contributor
Author
|
Please merge #145 first. I wanted to separate these out because this is a spec change to make the Volumes field OPTIONAL |
| "$ref": "defs.json#/definitions/mapStringObject" | ||
| "oneOf": [ | ||
| {"$ref": "defs.json#/definitions/mapStringObject"}, | ||
| {"type": "null"} |
Contributor
Member
|
LGTM (beside @wking nit) (IANAM) |
Member
|
This can be closed now - #152 has been merged with the commits from here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a spec change based on testing live Docker Hub configs. Volume may
be null as found in the hub.docker.com/library/docker image.
This is a continuation of #145
Signed-off-by: Brandon Philips brandon.philips@coreos.com